package com.qijian.maindata.domain.query;

import com.baomidou.mybatisplus.annotation.TableName;
import com.qijian.common.utils.mybatis.WhereType;
import com.qijian.common.utils.mybatis.WhereTypeEnum;
import lombok.Data;
import lombok.ToString;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
import java.util.Set;


/**
 * 核算工单对象 查询条件类
 *
 * @author qijian
 * @date 2023-02-09
 */

@Data
@ToString
@TableName("main_adjust_order")
public class AdjustOrderQuery {

    @WhereType(filed = "id")
    private Long id;
    @WhereType(filed = "id", type = WhereTypeEnum.IN)
    private Set<Long> ids;
    @WhereType(filed = "number", type = WhereTypeEnum.LIKE)
    private String number;
    @WhereType(filed = "task_id")
    private Long taskId;
    @WhereType(filed = "task_by", type = WhereTypeEnum.LIKE)
    private String taskBy;
    @WhereType(filed = "source_id")
    private Long sourceId;
    @WhereType(filed = "source_type", type = WhereTypeEnum.LIKE)
    private String sourceType;
    @WhereType(filed = "source_number", type = WhereTypeEnum.LIKE)
    private String sourceNumber;
    @WhereType(filed = "source_name", type = WhereTypeEnum.LIKE)
    private String sourceName;
    @WhereType(filed = "dispatch_content", type = WhereTypeEnum.LIKE)
    private String dispatchContent;
    @WhereType(filed = "work_time")
    private BigDecimal workTime;
    @WhereType(filed = "task_id")
    private Long userId;
    @WhereType(filed = "work_cost")
    private BigDecimal workCost;
    @WhereType(filed = "dispatch_time", type = WhereTypeEnum.BETWEEN)
    private Date[] dispatchTime;
    @WhereType(filed = "status", type = WhereTypeEnum.LIKE)
    private String status;
    @WhereType(filed = "remarks", type = WhereTypeEnum.LIKE)
    private String remarks;
    @WhereType(filed = "approval_by")
    private String approvalBy;
    @WhereType(filed = "approval_time", type = WhereTypeEnum.BETWEEN)
    private Date[] approvalTime;
    @WhereType(filed = "approval_status")
    private String approvalStatus;
    @WhereType(filed = "create_id")
    private Long createId;
    @WhereType(filed = "dispatch_time", type = WhereTypeEnum.BETWEEN)
    private List<String> createTimeStr;

    @WhereType(fields = {"create_id", "task_id"})
    private Long scopeId;

    @WhereType(ignore = true)
    private String year;

    @WhereType(filed = "dispatch_time", type = WhereTypeEnum.BETWEEN)
    private Date[] createTime;

//    @WhereType(ignore = true)
//    private Integer year;

    @WhereType(filed = "dispatch_time", type = WhereTypeEnum.BETWEEN)
    private List<String> createTimes;

    @WhereType(ignore = true)
    private Integer type;
}
